home *** CD-ROM | disk | FTP | other *** search
- Path: solon.com!not-for-mail
- From: seebs@solutions.solon.com (Peter Seebach)
- Newsgroups: comp.lang.c
- Subject: Re: fflush and Visual C++
- Date: 16 Mar 1996 20:55:11 -0600
- Organization: Usenet Fact Police (Undercover)
- Message-ID: <4ifuuf$fha@solutions.solon.com>
- References: <4idhv5$dnv@news.mhv.net> <314b173b.71056173@nntp.ix.netcom.com>
- NNTP-Posting-Host: solutions.solon.com
-
- In article <314b173b.71056173@nntp.ix.netcom.com>,
- Mike Rubenstein <miker3@ix.netcom.com> wrote:
- >Perhaps because Visual C implements fflush() correctly. fflush() does
- >not flush input buffers. fflush() with stdin as an argument results
- >in undefined behavior.
-
- The first part of this is incorrect. fflush() may flush input buffers.
- It may cause the program to abort. It may do nothing. But there's
- nothing *wrong* with it choosing to discard pending input when invoked
- on an input stream. Except that it's rude of an implementation to offer
- a silent extension, it causes people to make mistakes.
-
- -s
- --
- Peter Seebach - seebs@solon.com - Copyright 1996 Peter Seebach.
- C/Unix wizard -- C/Unix questions? Send mail for help. No, really!
- FUCK the communications decency act. Goddamned government. [literally.]
- The *other* C FAQ - http://www.solon.com/~seebs/c/c-iaq.html
-